/**
 * 2018年12月23日上午11:38:54
 * @author 谢进财
 */
package com.baihang.platform.entity.dbMap;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

import com.baihang.framework.kit.DateKit;
import com.baihang.platform.entity.GroupEntity;

/**
 * @author whati
 *
 */
@Repository
public class GroupEntityRowMap implements RowMapper<GroupEntity> {

	/* (non-Javadoc)
	 * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
	 */
	@Override
	public GroupEntity mapRow(ResultSet rs, int rowNum) throws SQLException {
		GroupEntity entity = new GroupEntity();
		entity.setId(rs.getString("id"));
		entity.setName(rs.getString("groupName"));
		entity.setDate(DateKit.toDateTimeString(rs.getDate("addTime")));		
		return entity;
	}

}
